SchemaField

@Serializable
class SchemaField(val name: String? = null, val type: SchemaField.SchemaFieldType? = null, val required: Boolean? = null, val system: Boolean? = null, val hidden: Boolean? = null, val presentable: Boolean? = null, val id: String? = null, val min: JsonPrimitive? = null, val max: JsonPrimitive? = null, val exceptDomains: List<String>? = null, val onlyDomains: List<String>? = null, val maxSelect: Int? = null, val maxSize: Long? = null, val autogeneratePattern: String? = null, val pattern: String? = null, val primaryKey: Boolean? = null, val convertUrls: Boolean? = null, val onlyInt: Boolean? = null, val values: List<String>? = null, val mimeTypes: List<String>? = null, val thumbs: List<String>? = null, val protected: Boolean? = null, val collectionId: String? = null, val minSelect: Int? = null, val cascadeDelete: Boolean? = null, val onCreate: Boolean? = null, val onUpdate: Boolean? = null)

The schema for a Collection's field.

There are additional fields that depend on the SchemaFieldType. For a list of them see this file's source

Parameters

name

the name given to the schema by the creator

type

the SchemaFieldType assigned to the schema on creation

required

weather or not, the schema is required to have a value. If this is false, the Serializable class should have an optional(?) type

system

whether the schema is part of the pocketbase system

hidden

whether the field is hidden from JSON API and filters

presentable

whether the field should be prioritized in superuser relations

id

the unique ID of the schema

Constructors

Link copied to clipboard
constructor(name: String? = null, type: SchemaField.SchemaFieldType? = null, required: Boolean? = null, system: Boolean? = null, hidden: Boolean? = null, presentable: Boolean? = null, id: String? = null, min: JsonPrimitive? = null, max: JsonPrimitive? = null, exceptDomains: List<String>? = null, onlyDomains: List<String>? = null, maxSelect: Int? = null, maxSize: Long? = null, autogeneratePattern: String? = null, pattern: String? = null, primaryKey: Boolean? = null, convertUrls: Boolean? = null, onlyInt: Boolean? = null, values: List<String>? = null, mimeTypes: List<String>? = null, thumbs: List<String>? = null, protected: Boolean? = null, collectionId: String? = null, minSelect: Int? = null, cascadeDelete: Boolean? = null, onCreate: Boolean? = null, onUpdate: Boolean? = null)

Types

Link copied to clipboard

The type of Schema Field selected by the creator.

Properties

Link copied to clipboard
Link copied to clipboard
val cascadeDelete: Boolean? = null
Link copied to clipboard
val collectionId: String? = null
Link copied to clipboard
val convertUrls: Boolean? = null
Link copied to clipboard
val exceptDomains: List<String>? = null
Link copied to clipboard
val hidden: Boolean? = null
Link copied to clipboard
val id: String? = null
Link copied to clipboard
val max: JsonPrimitive? = null
Link copied to clipboard
val maxSelect: Int? = null
Link copied to clipboard
val maxSize: Long? = null
Link copied to clipboard
val mimeTypes: List<String>? = null
Link copied to clipboard
val min: JsonPrimitive? = null
Link copied to clipboard
val minSelect: Int? = null
Link copied to clipboard
val name: String? = null
Link copied to clipboard
val onCreate: Boolean? = null
Link copied to clipboard
val onlyDomains: List<String>? = null
Link copied to clipboard
val onlyInt: Boolean? = null
Link copied to clipboard
val onUpdate: Boolean? = null
Link copied to clipboard
val pattern: String? = null
Link copied to clipboard
val presentable: Boolean? = null
Link copied to clipboard
val primaryKey: Boolean? = null
Link copied to clipboard
val protected: Boolean? = null
Link copied to clipboard
val required: Boolean? = null
Link copied to clipboard
val system: Boolean? = null
Link copied to clipboard
val thumbs: List<String>? = null
Link copied to clipboard
Link copied to clipboard
val values: List<String>? = null

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun toString(): String